package com.mxchip.livestarmobile.mobile;


import android.content.Intent;
import android.os.Bundle;

import androidx.core.view.ViewCompat;
import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import com.mxchip.livestarmobile.R;

import static android.app.Activity.RESULT_OK;


/**
 * A simple {@link Fragment} subclass.
 */
public class SettingsFragment extends Fragment {


    public SettingsFragment() {
        // Required empty public constructor
    }


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View root = inflater.inflate(R.layout.fragment_settings, container, false);

        Button btnNext = root.findViewById(R.id.button_hangup);
        btnNext.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                // Navigation.findNavController(v).navigate(R.id.action_fragment_settings_to_meetingFragment);

                Intent intent = new Intent();
                intent.putExtra("test", 111);
                getActivity().setResult(RESULT_OK, intent);
                getActivity().finish();
            }
        });

        ViewCompat.setTranslationZ(root, -1f);

        return root;
    }

}
